<article class="cl pd-20">
    <form action="" method="post" class="form form-horizontal" id="form-admin-add">
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>手机：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$manager.mobile}" placeholder="" id="mobile" name="mobile">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>初始密码：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="password" class="input-text" autocomplete="off" value="" placeholder="密码" id="password" name="password">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>确认密码：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="password" class="input-text" autocomplete="off"  placeholder="确认新密码" id="password2" name="password2">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">角色：</label>
            <div class="formControls col-xs-8 col-sm-9"> <span class="select-box" style="width:150px;">
                    <select class="select" name="role_id" size="1">
                        <option value="">请选择角色</option>
                        {foreach $rolelist as $role}
                        <option <?php echo $manager['role_id']==$role['id']?'selected':''; ?> value="{$role['id']}">{$role['name']}</option>
                        {/foreach}
                    </select>
                </span> </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <a onclick="submit()" class="btn btn-primary radius" >&nbsp;&nbsp;提交&nbsp;&nbsp;</a>
            </div>
        </div>
    </form>
</article>

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
   function submit () {
        $('#form-admin-add').ajaxSubmit(function(res){
            if(res.ret==0) {
                layer.open({
                    content:res.message,
                    yes:function(){
                        layer.closeAll();
                        parent.location.reload();
                    }
                })
            }else{
                layer.msg(res.message);
            }
        });
    }
</script>
